package com.scujcc.ssm.Service.ServiceIml;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.scujcc.ssm.Dao.BookDao;
import com.scujcc.ssm.Entity.Book;
import com.scujcc.ssm.Service.IBookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class BookServiceImpl extends ServiceImpl<BookDao, Book> implements IBookService {

    @Autowired
    BookDao bookDao;

    @Override
    public Page<Book> getPage(int currentPage, int pageSize) {
        Page<Book> bookPage = new Page<>(currentPage, pageSize);
        bookDao.selectPage(bookPage,null);
        return bookPage;

    }
}
